import {config, request} from 'utils'

const {api} = config
const {chatroomMember} = api

export function query (params) {
  return request({
    url: chatroomMember,
    method: 'get',
    data: params,
  })
}

export function queryById (params) {
  return request({
    url: chatroomMember + '/findOne',
    method: 'get',
    data: params,
  })
}

export function remove (params) {
  return request({
    url: chatroomMember + '/delete',
    method: 'post',
    data: params,
  })
}

export function create (params) {
  return request({
    url: chatroomMember,
    method: 'post',
    data: params,
  })
}

export function update (params) {
  return request({
    url: chatroomMember,
    method: 'put',
    data: params,
  })
}
